package cn.spring.ly.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

import org.apache.solr.client.solrj.beans.Field;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 对应solr
 * </p>
 *
 * @author ly
 * @since 2018-12-19
 */
@Data
public class GoodSolr implements Serializable {

	private static final long serialVersionUID = 1L;

	@Field(value = "id") // 与solr字段一致可以不写
	@TableId(value = "id", type = IdType.AUTO)
	private String id;

	@Field(value = "category_id")
	private String categoryId;
	/**
	 * 商品名称
	 */
	@Field
	private String name;

	@Field(value = "goods_number")
	private String goodsNumber;

	/**
	 * 零售价格 售价
	 */
	@Field(value = "retail_price")
	private String retailPrice;
	/**
	 * 原价
	 */
	@Field(value = "market_price")
	private String marketPrice;

	/**
	 * 不是数据库字段
	 */
	@TableField(exist = false)
	@Field(value = "category_parent_name") // 对应solr字段
	private String categoryParentName;

	@Field(value = "category_name") // 对应solr字段
	@TableField(exist = false)
	private String categoryName;

}
